The present invention relates to a filtering method and a filter, which are used in connection with digital video transmission. The filtering is performed at the receiver side, and the method is especially suitable to be used in connection with mobile terminals and other terminals operating at relatively low transmission line rates.
Nowadays video signals are increasingly transferred in different digital formats. The digital formats use the transmission band width more efficiently than analog formats. Today""s video compression standards, like H.261, H.263, MPEG-1 and H.262 (MPEG-2), define a bit string syntax and a decoder structure, but not an encoding algorithm or apparatus. Thus, different encoders may, and are likely to, produce different bit strings, given the same input sequence and the same target bit rate. This freedom in the encoding of a video sequence gives prospects for achieving better quality of the coded video by application of more sophisticated encoding strategies, in the framework of the standards.
Even if the decoder structure as a whole is defined, there are still many procedures in which the codec manufacturers have the possibility to realize the decoder in a different way. One such a freedom is filtering of the received video signal at the decoder side. The filtering has a significant influence on the quality of the video picture, especially when operating at low transmission line rates and with coding standards utilizing Discrete Cosine Transform (DCT) based technology. It is characteristic to the DCT- based video codecs that the video signal is coded in quadratic sections (generally known as blocks or video blocks, formed, e.g., of 8*8 or 16*16 video pixels) of the video picture, and that the boundaries between the different video blocks after decoding appear visible impairing the quality of the video signal presented, e.g., on a video monitor or video projector. These kind of coding errors, like some other types of coding errors, will here be called artefacts.
Patent publication U.S. Pat. No. 5,619,267 describes one possible way of implementing a filtering process at the decoder side. The described embodiment uses H.261 standard video coding technology, the general operation of which is known to a person skilled in the art, and has been described in said patent publication (more exactly in column 1, line 7 to column 2, line 39). The patent publication presents a filtering method, which utilizes the H.261 standard based in-block filtering method (column 2, lines 18-34) also for filtering the boundaries between adjacent video blocks. This is done by shifting the video memory addresses in horizontal and vertical dimension, e.g., by 4 pixels, and repeating the standard filtering process for all the video pixels or for only the pixels located directly at the edge of the adjacent video blocks (column 4, line 53xe2x80x94column 5, line 37).
One significant disadvantage of filtering is that the sharpness of the video picture is reduced. The optimal picture quality can be obtained with a filter having an adjustable efficiency by which a compromise in video picture quality can be worked out so that the artefact generally called xe2x80x9cblocking effectxe2x80x9d is not too visible and the picture is still sharp enough. The optimal filtering degree is also a function of the amount of movement in the video picture and the available transmission line rate. The filtering method described in the patent publication U.S. Pat. No. 5,619,267 is not adjustable, so it can not be optimally used in reference to the quality of the video picture.
Patent publication U.S. Pat. No. 4,941,043 presents a filtering method, in which the degree of filtering at the decoder is adjusted on basis of the frequency limitation that was made for each video block at the encoder side. This method requires the transmission of side information for each encoded video block from the transmitter to the receiver. This reduces the video compression efficiency and makes the method unsuitable for the already established video compression algorithms, such as H.261.
Now a novel adaptive filtering method for a video picture has been invented with which the above mentioned drawbacks can be reduced. One object of this filtering method is to reduce blocking artefacts without significantly degrading the picture resolution. This is realized by shifting the numerical values of boundary samples, i.e. the numerical values describing the luminance and chrominance information of video pixels close to the boundary between adjacent video blocks, to the reference line, not by low-pass filtering. The reference line is graphically a straight line which is drawn from the numerical value of one reference video pixel in one of the adjacent video blocks to the numerical value of another reference video pixel from the other of the adjacent video blocks over the boundary between the blocks, where the straight line (reference line) is formed as a function of place of video pixel and its numerical value. The video pixels are selected so that the pixels on which the filtering is performed will be located between the above mentioned reference pixels. Depending on the distance from the boundary between the adjacent video blocks, the numerical values of each video pixel, to which filtering according to the invention is performed, is directed towards the reference line in such a way that the closer the video pixel is to the boundary, the more the numerical value is directed towards the reference line. This reduces the disappearance of the resolution in the picture in the filtering process according to the invention because the adjacent video pixels as such are not filtered in comparison with each other but are adjusted in comparison to the reference line.
If there is lot of activity inside two adjacent video blocks, and at the boundary between them, that part of video frame most probably includes important information, and filtering at that area should be outlined to the minimum or completely omitted. On the other hand, if there is no or very little (probably just noise) activity in that area, the area is supposed to be xe2x80x9csmoothxe2x80x9d (e.g., a wall of one color), and an efficient filter can be used for a relatively large area to minimize the visible blocking effect, which is as it""s worst just at the xe2x80x9csmoothxe2x80x9d areas. In one embodiment, later described in more detailed, three different branches are used for classification of the different picture areas: xe2x80x9csmoothxe2x80x9d, xe2x80x9cmoderatexe2x80x9d, and xe2x80x9chigh activityxe2x80x9d, and the filter is adjusted accordingly. The same conditional equation is used to determine if the filtering according to the invention is applied at the boundary under examination, and in positive conclusion to select the used filtering method.
According to a first aspect of the present invention there is provided a method of filtering a received video picture, in which
a digital video picture is received, the video picture comprising video blocks, each video block comprising a certain amount of individual video pixels, each video pixel having a numerical value defining a property of the video pixel and having a certain location in the video picture, and in which video picture a first video block and a second video block located adjacent the first video block define a boundary therebetween,
a first video pixel from the first video block and a second video pixel from a second video block are selected in such a way that they are adjacent each other on the opposite sides of the boundary, and
the first video pixel and the second video pixel are filtered, wherein
a first reference video pixel is selected in the first video block and a second reference video pixel is selected in the second video block in such a way that the first reference pixel, the first video pixel, the second video pixel and the second reference pixel are situated on a straight line, perpendicular to the boundary, drawn from the first reference video pixel to the second reference video pixel,
a linear equation is defined, the linear equation giving as a solution a numerical reference value to each pixel on said straight line as a function of the location of the pixel on said straight line, and
the filtering is performed by adjusting the numerical value of the first video pixel towards its reference value,and by adjusting the numerical value of the second video pixel towards its reference value.
According to a second aspect of the present invention there is provided a terminal device for filtering a received video picture, which video picture comprises video blocks, each video block comprises a certain amount of individual video pixels, each video pixel having a numerical value defining a property of the video pixel and having a certain location in the video picture, in which video picture a first video block and a second video block located adjacent the first video block define a boundary therebetween, and the terminal device comprising
first selecting means for selecting a first video pixel from the first video block and a second video pixel from a second video block in such a way that they are adjacent each other on the opposite sides of the boundary, wherein it further comprises
second selecting means for selecting a first reference video pixel in the first video block and a second reference video pixel in the second video block in such a way that the first reference pixel, the first video pixel, the second video pixel and the second reference pixel are situated on a straight line, perpendicular to the boundary, drawn from the first reference video pixel to the second reference video pixel,
defining means for defining a linear equation, the linear equation giving as a solution a numerical reference value to each pixel on said straight line as a function of the location of the pixel on said straight line, and
adjusting means for filtering the first video pixel and the second video pixel by adjusting the numerical value of the first video pixel towards its reference value, and the numerical value of the second video pixel towards its reference value.